package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.Course;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface CourseService extends IService<Course> {

    Page<Course> pageList(PageUtil pageUtil, Long mainId, Long typeId, String keyword, Integer enabled, Integer hotStatus);

    int getMaxShowOrder(Long courseTypeId);

    void updateEnabled(Long id, Integer enabled);

    void updateHotStatus(Long id, Integer hotStatus);

    long dropCourse(Long id);

    Course getGtOrderNum(Long courseTypeId, Integer orderNum);

    Course getLtOrderNum(Long courseTypeId, Integer orderNum);

    /**
     * 设置序号
     */
    void updateOrderNum(Long id, Integer orderNum);

    long getByTypeIdCnt(Long typeId);

    void updateUrl(Long id, String url);
}
